package b2.config
{
	public class FormulaConfig
	{
		//所需坦克
		public var requireTanks:Array;
		//合成坦克
		public var resultTank:int;
		//成功率
		public var successRate:Array;
		//所需物品
		public var materialIndex:Array;
		//所需物品数量
		public var materialNum:Array;
		
		public function FormulaConfig(formulaXML:XML)
		{
			if (formulaXML.requireTanks != undefined)
				requireTanks = formulaXML.requireTanks.split(",");
			resultTank = formulaXML.resultTank;
			successRate = formulaXML.successRate.split(",");
			materialIndex = formulaXML.materialIndex.split(",");
			materialNum = new Array();
			for (var i:int = 0; i < formulaXML.materialNum.length(); i++)
			{
				materialNum.push(formulaXML.materialNum[i].split(","));
			}
		}

	}
}